<!--
<div class="panel panel-default panel-intro">
    {:build_heading()}

    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div id="toolbar" class="toolbar">
                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
                        <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('card/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
                        <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('card/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
                        <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('card/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
                        

                        

                        
                    </div>
                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                           data-operate-edit="{:$auth->check('card/edit')}"
                           data-operate-del="{:$auth->check('card/del')}"
                           width="100%">
                    </table>
                </div>
            </div>

        </div>
    </div>
</div>
-->
<form id="config-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST" action="card/edit">
    <div class="panel panel-default panel-intro">
        <div class="panel-body">
            <div id="myTabContent" class="tab-content">
                <div class="tab-pane fade active in" id="one">

                    <table class="table table-striped table-config">
                        <tbody>
                        <tr data-type="base">
                            <td width="15%">会员名称</td>
                            <td>
                                <div class="row">
                                    <div class="col-sm-8 col-xs-12">
                                        <input type="text" name="row[card_name]" value="{$datas.config['card_name']}" class="form-control" data-rule="required" data-tip="请填写会员卡名称"/>
                                    </div>
                                    <div class="col-sm-4"></div>
                                </div>
                            </td>
                        </tr>

                        <tr data-type="base">
                            <td width="15%">月卡价格</td>
                            <td>
                                <div class="row">
                                    <div class="col-sm-8 col-xs-12">
                                        <input type="text" name="row[month_price]" value="{$datas.config['month_price']}" class="form-control" data-rule="required" data-tip="请填写月卡价格"/>
                                    </div>
                                    <div class="col-sm-4"></div>
                                </div>
                            </td>
                        </tr>

                        <tr data-type="base">
                            <td width="15%">半年度价格</td>
                            <td>
                                <div class="row">
                                    <div class="col-sm-8 col-xs-12">
                                        <input type="text" name="row[quarter_price]" value="{$datas.config['quarter_price']}" class="form-control" data-rule="required" data-tip="请填写半年度价格"/>
                                    </div>
                                    <div class="col-sm-4"></div>
                                </div>
                            </td>
                        </tr>

                        <tr data-type="base">
                            <td width="15%">年卡价格</td>
                            <td>
                                <div class="row">
                                    <div class="col-sm-8 col-xs-12">
                                        <input type="text" name="row[year_price]" value="{$datas.config['year_price']}" class="form-control" data-rule="required" data-tip="请填写年卡价格"/>
                                    </div>
                                    <div class="col-sm-4"></div>
                                </div>
                            </td>
                        </tr>

                        <tr data-type="base">
                            <td width="15%">分享享折扣</td>
                            <td>
                                <div class="row">
                                    <div class="col-sm-8 col-xs-12">
                                        <input type="text" name="row[discount]" value="{$datas.config['discount']}" class="form-control" data-rule="required" data-tip="请填写折扣"/>
                                    </div>
                                    <div class="col-sm-4">折</div>
                                </div>
                            </td>
                        </tr>

                        <tr data-type="base">
                            <td width="15%">权益介绍</td>
                            <td>
                                <div class="row">
                                    <div class="col-sm-8 col-xs-12">
                                        <textarea class="form-control editor" rows="8" name="row[description]">{$datas.config['description']}</textarea>
                                    </div>
                                    <div class="col-sm-4"></div>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="form-group layer-footer">
                        <label class="control-label col-xs-12 col-sm-2"></label>
                        <div class="col-xs-12 col-sm-8">
                            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
                            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>

<script>

    require.callback = function () {

        define('backend/card', ['jquery', 'form'], function ($, Form) {
            var Controller = {
                index: function () {
                    Form.api.bindevent($("form[role=form]"));
                    // tabevent();
                }
            };
            return Controller;
        });

    }
</script>